package authDao

import "roomAdmin/dao"

func CheckLogin(username string) (pwd string, role int, err error){
	var sqlStr string
	sqlStr = `SELECT
			user.pass_word
			user.role
			FROM
			user
			WHERE
			user.use_id = ?`
	err = dao.DB.QueryRow(sqlStr, username).Scan(&pwd,&role)
	if err != nil {
		return
	}
	return
}